<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
  <head>
    <title>event-rule-update</title>
    <%@ include file="../include/common.jsp"%>
	<%@ include file="../include/crontab.jsp"%>
    <%@ include file="../include/timeUnit.jsp"%>
    <script type="text/javascript">
		$(function(){
			$("input[type=radio][value="+'${eventRule.level}'+"]").attr("checked",'checked'); 
			if(${recoverable} == 0){
		       	$("#durationFitTr").css({"display":""});
			  	$("#keyWordTr").css({"display":""});
		   	} else{
		       	$("#durationFitTr").css({"display":"none"});
			   	$("#keyWordTr").css({"display":"none"});
		    }
		})
    </script>
  </head>
  
  <body>
    	<form action="" id="myform" name="myform" method="post">
    		<table class="table_eidt" >
    			<tr>
    				<th class="td_left" width="150px">
    					<label>事件类别</label>
    				</th>
    				<td class="td_right">
			        	${eventTypeName}
    				</td>
    			</tr>
    			<tr>
    				<th class="td_left">
    					<label>事件级别</label>
    				</th>
    				<td class="td_right">
    					<input disabled="disabled" type="radio" name="level"  value="2" ><label style="color: #C8FF00">轻微</label>
						<input disabled="disabled" type="radio" name="level"  value="3" ><label style="color: #FFD200">警告</label>
						<input disabled="disabled" type="radio" name="level"  value="4" ><label style="color: #FF9200">重要</label>
						<input disabled="disabled" type="radio" name="level"  value="5" ><label style="color: #FF1042">严重</label>
    				</td>
    			</tr>
    			<tr height="80px">
    				<th class="td_left">
    					<label>事件表达式</label>
    				</th>
    				<td class="td_right">
    					<span>${eventRule.expr}</span>
    				</td>
    			</tr>
    			<tr>
    				<th class="td_left">
    					<label>事件阀值持续时间(秒)</label>
    				</th>
    				<td class="td_right">
    					${eventRule.duration}
    				</td>
    			</tr>
    			<tr>
	    			<td class="td_left">自动确认间隔时间</td>
	    			<td class="tdValue">
	    				${confirmDuration}
	    			</td>
    			</tr>
    			<tr style="display: none;" id="durationFitTr" >
	    			<td class="td_left">事件过滤持续时间</td>
	    			<td class="tdValue">
	    				${filterDuration}
	    			</td>
    			</tr>
    			<tr style="display: none;" id="keyWordTr" >
	    			<td class="td_left">过滤内容</td>
	    			<td class="td_right">${eventRule.keyWord}</td>
    			</tr>
    			<tr>
    				<th class="td_left">
    					<label>有效时间段</label>
    				</th>
    				<td class="td_right">
    					<span>${vailTime}</span>
    				</td>
    			</tr>
    			<tr height="80px">
    				<th class="td_left">
    					<label>事件消息</label>
    				</th>
    				<td class="td_right">
	    				<span>${eventRule.msg}</span>
    				</td>
    			</tr>
    			<tr height="80px">
    				<th class="td_left" >
    					<label>规则注释</label>
    				</th>
    				<td class="td_right">
    					${eventRule.remarks}
    				</td>
    			</tr>
    		</table>
    	</form>
  </body>
  
</html>
